<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看学生明细</title>
</head>
<body>
<form>
    <table border="1">
        <tr><td colspan="2"><h1>查看学生明细</h1></td></tr>
        <tr>
            <td>学生编号</td>
            <td>
                   <span id="id"></span>
            </td>
        </tr>
        <tr>
            <td>学生姓名</td>
            <td>
                   <span id="sname"></span>
            </td>
        </tr>
        <tr>
            <td>生日</td>
            <td>
                   <span id="birthday"></span>
            </td>
        </tr>
        <tr>
            <td>性别</td>
            <td>
                   <span id="gender"></span>
            </td>
        </tr>
        <tr>
            <td>电话</td>
            <td>
                   <span id="telephone"></span>
            </td>
        </tr>
        <tr>
            <td>邮箱</td>
            <td>
                   <span id="email"></span>
            </td>
        </tr>
        <tr>
            <td>班级编号</td>
            <td>
                   <span id="classid"></span>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" id="fanhui" value="返回"/>
            </td>
        </tr>
    </table>
</form>
<script src="/js/jquery-1.12.4.js"></script>
<script>
    var param = location.href.substring(location.href.indexOf('?')+1);
    $.getJSON("/student/findById.json",param,function(detail){
        $("#id").text(detail.id);
        $("#sname").text(detail.sname);
        $("#birthday").text(detail.birthday);
        $("#gender").text(detail.gender);
        $("#telephone").text(detail.telephone);
        $("#email").text(detail.email);
        $("#classid").text(detail.classid);
    });
    $("#fanhui").click(function(){
        location.href="/admin/student/list.html";
    });
</script>

</body>
</html>